Recall from lab that exponentially growing virus, \(V\) should look like this: \[
V(t) = V_0 e^{rt}
\] which, on the log scale, is a nice linear model: \[
\log[V(t)] = \log(V_0) + rt
\] Our study:
ten strains of virus grown in cell culture
take samples on days 1, 3, and 5 and titer the virus
expect strains to vary in their growth rates
What if we expect that viruses that are very infectious (have a high \(V_0\) given a dose) have a low growth rate (\(r\)), and vice versa?.
Simulating our example
Need to simulate data where \(r\) and \(V_0\) are correlated for each strain.
r_mu <-2.5# mean growth rater_sig <-0.75# sd of growth rateslV0_mu <-log(1e4) # mean initial virus population lV0_sig <-1# sd of initial virus populationrho <--0.65# correlation between lV0 and r# vector of meansMu <-c(lV0_mu, r_mu)# vector of standard deviationssigmas <-c(lV0_sig, r_sig)
How to deal with covariances in parameters?
We want parameters drawn from a joint distribution of \(r\) and \(\log(V_0)\) where high values in one are associated with low values in the other.
We need a matrix describing this covariance
Option 1 to build covariance matrix:
# covariance of the two parameters(cov_lV0r <- r_sig * lV0_sig * rho)